{include file="Public:header" /}
		<div class="bar bar-nav">
			<h1 class="title">活动列表</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>
		
		{include file="Public:nav" /}	

		<div class="content">
                    <form name="form" action="__ROOT__/ActivityDetail/activity_list" method="get" id="loginform">
                        
			<div class="search pad20">
				<div class="in_map">
					<i class="iconfont icon-map"></i><span id="city-picker">{$city}</span>
                                        <input name="city" id='city_value' type="hidden" value="{$city}">
				</div>
				<div class="in_search">
					<div class="searchbar">
						<a class="searchbar-cancel">取消</a>
						<div class="search-input">
							<label class="icon icon-search" for="search"></label>
							<input type="search" name="activity_name" id='search' placeholder='输入关键字...' value="{$name_type['activity_name']}" />
						</div>
					</div>
				</div>
			</div>
                    </form>
                    <input type='hidden' id='category_value' value="{$name_type['category']}"><input type='hidden' id='activity_name' value="{$name_type['activity_name']}">
			<div class="buttons-tab screen" style="margin-top:10px;"  onchange="search()">
				<span class="tab-link button">
					<select name='category' id="select1">
                                            <option value="">请选择分类</option>
                                            {foreach name="category" item="category" key="cc"}
						<option value="{$category['id']}" >{$category['name']}</option>
                                            {/foreach}
<!--						<option>活动分类一</option>
						<option>活动分类一</option>-->
					</select>
				</span>
				<span class="tab-link button">
					<select name="end_time" id="select2">
						<option value="">时间</option>
						<option value="86400">一天以内</option>
						<option value="259200">三天以内</option>
						<option value="604800">一周以内</option>
						<option value="2592000">一月以内</option>
					</select>
				</span>
				<span class="tab-link button">
					<select name="price_order" id="select3">
						<option value="">费用</option>
						<option value="desc">从高到低</option>
						<option value="asc">从低到高</option>
					</select>
				</span>
			</div>
                        
			
			<div class="in_hot_box activity_1" id="ajax_return">
                                    

			</div>

		</div>

{include file="Public:city_box" /}
		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<!--<script type="text/javascript" src="__PUBLIC__/Home/activity/js/huodon.js" ></script>-->
                <script type="text/javascript" src="__PUBLIC__/Admin/bootstrap_validator-0.4.5/dist/js/bootstrapValidator.js"></script>
                <script>
                    
                    
$(function() {
	//详情页底部滑块
	
	/*$(".discuss_form").click(function() {
		$(".discuss_2").slideToggle();
	})*/
	
	$(".discuss_close").click(function() {
		$(".activity_from").slideUp();
		$(".activity_from_bg").slideUp();
	})
	$(".activity_nav a.js-sc").click(function() {
		$(this).toggleClass("active");
	})
	$(".activity_btn span").click(function() {
		var el = $('.activity_txt .content-padded'),
			curHeight = el.height(),
			autoHeight = el.css('max-height', 'none').height();
		el.animate({
			maxHeight: autoHeight
		});
		$(this).hide()
	})

//首页城市选择
	$(".letter a").click(function() {
		var s = $(this).html();
		window.location.href = '#' + s + '1';
		$("#showLetter span").html(s);
		$("#showLetter").show().delay(500).hide(0);
	});
	//中间的标记显示
	$('body').on('onMouse', '.showLetter span', function() {
		$("#showLetter").show().delay(500).hide(0);
	});
	$(".in_map,.city_box .close").click(function() {
		$(".city_box").slideToggle();
	})
	$(".city-list p").click(function() {
		$(".city_box").fadeOut();
		$(".in_map span").html($(this).html())
		window.location.href = '__ROOT__/ActivityDetail/activity_list'+'?city='+$(this).html();
		console.log($(this).html())
	})
});
                </script>
                
                <script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
		</script>

                <script>
                        $(document).ready(function(){  
                            var category = document.getElementById('category_value');
                            var value1 = category.value;
                            var city = document.getElementById('city_value');
                            var value4 = city.value;
                            var name = document.getElementById('activity_name');
                            var value6 = name.value;
                            search(value1,value4,value6);//默认取第一页
                        });
                    function search(value1,value4,value6) {
                        if(value1!=''){
                            var value1 = value1;
                        }
                        if(value6!=''){
                            var value6 = value6;
                        }
                        var category = document.getElementById('select1');
                        var value5 = category.value;
                        if(value4!=''){
                            var value4 = value4;
                        }
                        var end_time = document.getElementById('select2');
                        var value2 = end_time.value;
                        var price_order = document.getElementById('select3');
                        var value3 = price_order.value;
                          $.ajax({
                              url:"__ROOT__/ActivityDetail/ajax_activity_list/city/{$city}",
                              type:'get',
//                              datatype:'json',
                              data:{value1:value1,value2:value2,value3:value3,value4:value4,value5:value5,value6:value6},
                              success:function(data){
                                    $("#ajax_return").html('');
                                    $("#ajax_return").append(data);
                              }
                          });
                    }
                </script>
	

	</body>

</html>


</html>